<!--搜索页-->
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>商品列表</title>
    <meta content="telephone=no" name="format-detection" />
    <link rel="apple-touch-icon-precomposed" href="../addons/eso_sale/recouse/images/apple-touch-icon.png"/>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="viewport" content="width=320, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link href="../addons/eso_sale/recouse/css/reset.css" rel="stylesheet" type="text/css" />
    <link href="../addons/eso_sale/recouse/css/search_new.css" rel="stylesheet" type="text/css" />
    <link href="../addons/eso_sale/recouse/css/foot.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../addons/eso_sale/recouse/css/xmapp.css"/>
    <link href="../addons/eso_sale/recouse/css/xin_v3.s.min.css" rel="stylesheet" type="text/css" />
    <link href="../addons/eso_sale/recouse/css/brand_detail_v7.s.min.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../addons/eso_sale/recouse/js/jquery-1.6.2.min.js"></script>
    <script type="text/javascript" src="../addons/eso_sale/recouse/js/search.js"></script>
    <script type="text/javascript" src="../addons/eso_sale/recouse/js/iscroll.js"></script>
    <script type="text/javascript" src="../addons/eso_sale/recouse/js/jquery.lazyload.js"></script>
    <script type="text/javascript" src="../addons/eso_sale/recouse/js/fbi.js"></script>
    <script type="text/javascript">
        jQuery(document).ready(
                function($){
                    $(".productlist img").lazyload({
                        placeholder : "../addons/eso_sale/recouse/images/img_bg4.png",
                        effect      : "fadeIn"
                    });
                });
    </script>
    <script type="text/javascript">
        jQuery(document).ready(function($) {
            $(".row_list img").lazyload({
                placeholder: "../addons/eso_sale/recouse/images//img_bg4.png",
                effect: "fadeIn"
            });
            $("#submit").click(function() {
                if($("#search_word").val()){
                    $("#searchForm").submit();
                } else {
                    alert("请输入关键词！");
                    return false;
                }
            });
        });
    </script>
</head>
<script type="text/javascript">
    document.write('<div id="global_loading" style="width: 100%;height: 100%;position: fixed;top: 0;left: 0;background-color: #eee;z-index:999"><div style="width: 100px;height: 75px;margin:auto;top:50%;position:relative"><span style="display:block;float:left;width:32px;height:32px;background:url(/../addons/eso_sale/recouse/images/spacer.gif);margin-top:-5px;"></span>&nbsp;&nbsp;加载中...</div></div>');
</script>
<body>

<div class="WX_search" id="mallHead">

    <div class="WX_bar_cate">
        <a href="{php echo $this->mturl('listCategory')}" id="__cate"></a>
    </div>
    <form class="WX_search_frm" action="mobile.php" id="searchForm" name="searchForm">
        <input type="hidden" name="act" value="module" />
        <input type="hidden" name="eid" value="{$_GPC['eid']}" />
        <input type="hidden" name="name" value="eso_sale" />
        <input type="hidden" name="do" value="Search" />
        <input type="hidden" name="uniacid" value="{$_GPC['uniacid']}" />
        <input name="keyword" id="search_word" class="WX_search_txt hd_search_txt_null" placeholder="请输入商品名进行搜索！" ptag="37080.5.2" type="search"  AUTOCOMPLETE="off"/>


        <div class="WX_me">
            <a href="javascript:;" id="submit" class="WX_search_btn_blue" >搜索</a>

        </div>
    </form>
</div>


<div class="tab">

    <!--Tab 标签end-->

    <!-- 分类浏览begin -->
    <!-- 排序begin -->
    <div class="paixu">
        <div class="tab">
            <a {if $sort==1}  class="price on"{else}class="price"{/if} onclick="location.href='{$sorturl}&sort=1&sortb1={$sortb11}'">销量↓</a>
            <a {if $sort==0}  class="time on"{else}class="time"	 {/if} onclick="location.href='{$sorturl}&sort=0&sortb0={$sortb00}'">时间↓</a>
            <a {if $sort==2}  class="renqi on"{else}class="renqi"{/if} onclick="location.href='{$sorturl}&sort=2&sortb2={$sortb22}'">人气↓</a>
            <a {if $sort==3}  class="click on"{else}class="click"{/if} onclick="location.href='{$sorturl}&sort=3&sortb3={$sortb33}'">价格↓</a>
        </div>
    </div>
    <!-- 排序end -->
    <div class="mod_filter_mask" id="filterMask" style="display: none;"></div>

    <div class="mod_itemgrid" id="itemCont">
        {loop $list $item}
        <div class="hproduct">
            <a href="{php echo $this->mturl('detail', array('id' => $item['id']))}">
                <p class="cover"><img src="{$_W['attachurl']}{$item['thumb']}" onload="setLoadTime1();"></p>
                {if $item['istime']==1}
                <p class="fn"><em id="time_{$item['id']}">{$item['timelaststr']}</em></p>




                <p class="prices"><strong><em>¥{$item['marketprice']}</em></strong><del>¥{$item['productprice']}</del><span class="discount">{php echo round($item['marketprice']/$item['productprice'],2)}折</span>
                    <script language='javascript'>
                        var total_time_{$item['id']} = {$item['timelast']};
                        var int_time_{$item['id']}  = setInterval(function(){
                            d({$item['id']});
                        },1000);
                    </script>


                </p>

                {else}
                <p class="fn"><span class="dis">{if $_GPC['isnew'] == 1}新品{/if}{if $_GPC['isdiscount'] == 1}特价{/if}{if $_GPC['ishot'] == 1}热卖{/if}</span>{$item['title']}{if $item['type'] == '2'}(虚拟){/if}</p>
                <p class="prices"><strong><em>¥{$item['marketprice']}</em></strong><del>¥{$item['productprice']}</del><span class="discount">{php echo round($item['marketprice']/$item['productprice'],2)}折</span></p>
                {/if}
            </a>

        </div>

        {/loop}

    </div>



    <!-- 分类浏览end -->
</div>
</div>
﻿<!--页面底部-->
<div class="viewport">
    <div id="footer" class="footer">
        <div class="row g_2">
            <a href="javascript:window.scrollTo(0,0);">{$_W['account']['name']}</a>
        </div>
    </div>
</div>




<div class="wx_nav"><a href="{php echo $this->mturl('list')}" data-href="###" ptag="37080.1.1" class="nav_index on">首页</a><a href="{php echo $this->mturl('listCategory')}"  ptag="37080.1.2" class="nav_search" style="display:">分类</a><a href="{php echo $this->mturl('mycart')}"  ptag="37080.1.3" class="nav_shopcart">购物车</a><a href="{php echo $this->mturl('myorder')}"  ptag="37080.1.4" class="nav_me">我的订单</a><a href="{$ydyy}"  ptag="37080.1.4" class="nav_fav">一键关注</a></div>


<script src="../addons/eso_sale/recouse/js/zepto.min.js" type="text/javascript"></script>
<script type="text/javascript">
    Zepto(function($){
        var $nav = $('.global-nav'), $btnLogo = $('.global-nav__operate-wrap');
        //点击箭头，显示隐藏导航
        $btnLogo.on('click',function(){
            if($btnLogo.parent().hasClass('global-nav--current')){
                navHide();
            }else{
                navShow();
            }
        });
        var navShow = function(){
            $nav.addClass('global-nav--current');
        }
        var navHide = function(){
            $nav.removeClass('global-nav--current');
        }

        $(window).on("scroll", function() {
            if($nav.hasClass('global-nav--current')){
                navHide();
            }
        });
    })
    function get_search_box(){
        try{
            document.getElementById('get_search_box').click();
        }catch(err){
            document.getElementById('keywordfoot').focus();
        }
    }
</script><script type="text/javascript">
    var global_loading=document.getElementById("global_loading");
    global_loading.parentNode.removeChild(global_loading);
</script>
<script type="text/javascript">



    function d(id){
        eval("total_time_" + id+"--");
        var total_time = eval("total_time_" + id);

        var days = parseInt(total_time/86400)

        var remain = parseInt(total_time%86400);
        var hours = parseInt(remain/3600)
        var remain = parseInt(remain%3600);

        var mins = parseInt(remain/60);
        var secs = parseInt(remain%60);

        if (total_time <= 0) {
            $("#time_" + id).html( "时间到了");
            var int_time =  eval("int_time_" + id);
            window.clearInterval(int_time);

        } else {

            var ret = "";
            if(days>0){
                days = days+"";
                if(days.length<=1) { days="0"+days;}
                ret+=days+" 天 ";
            }
            if(hours>0){
                hours = hours+"";
                if(hours.length<=1) { hours="0"+hours;}
                ret+=hours+":";
            }
            if(mins>0){
                mins = mins+"";
                if(mins.length<=1) { mins="0"+mins;}
                ret+=mins+":";
            }

            secs = secs+"";
            if(secs.length<=1) { secs="0"+secs;}
            ret+=secs;


            $("#time_" + id).html( "倒计时 " +ret);
        }
    }

</script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
    //获取指定cookes函数
    function getCookie(name)
    {
        var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");

        if(arr=document.cookie.match(reg))

            return unescape(arr[2]);
        else
            return null;
    }

    if(navigator.appName == 'Microsoft Internet Explorer'){
        if(navigator.userAgent.indexOf("MSIE 5.0")>0 || navigator.userAgent.indexOf("MSIE 6.0")>0 || navigator.userAgent.indexOf("MSIE 7.0")>0) {
            alert('您使用的 IE 浏览器版本过低, 推荐使用 Chrome 浏览器或 IE8 及以上版本浏览器.');
        }
    }

    // jssdk config 对象
    jssdkconfig = {php echo json_encode($_W['account']['jssdkconfig']);} || {};
    // 是否启用调试
    jssdkconfig.debug = false;
    //
    jssdkconfig.jsApiList = [
        'checkJsApi',
        'onMenuShareTimeline',
        'onMenuShareAppMessage',
        'onMenuShareQQ',
        'onMenuShareWeibo',
        'hideMenuItems',
        'showMenuItems',
        'hideAllNonBaseMenuItem',
        'showAllNonBaseMenuItem',
        'translateVoice',
        'startRecord',
        'stopRecord',
        'onRecordEnd',
        'playVoice',
        'pauseVoice',
        'stopVoice',
        'uploadVoice',
        'downloadVoice',
        'chooseImage',
        'previewImage',
        'uploadImage',
        'downloadImage',
        'getNetworkType',
        'openLocation',
        'getLocation',
        'hideOptionMenu',
        'showOptionMenu',
        'closeWindow',
        'scanQRCode',
        'chooseWXPay',
        'openProductSpecificView',
        'addCard',
        'chooseCard',
        'openCard'
    ];

    var wxData = {
        //"appId": "{$_W['account']['key']}",
        "imgUrl" : '{$_W['attachurl']}{$logo}',
        "link" : '{php echo $_W['siteroot']."app/".$this->mturl('list',array('id'=>$id))}&mid='+getCookie("mid"),
        "desc" : '{$description}',
        "title" : '{$_W['account']['name']}'
    };

    wx.config(jssdkconfig);
    wx.ready(function () {
        wx.onMenuShareAppMessage(wxData);
        wx.onMenuShareTimeline(wxData);
        wx.onMenuShareQQ(wxData);
        wx.onMenuShareWeibo(wxData);
    });
</script>

</body>
</html>